/* 主要容器样式 */
.chatContainer {
    max-width: 100%;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ededed;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    position: relative;
}

/* 顶部标题栏 */
.chatHeader {
    background: #2e2e2e;
    color: white;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.headerTitleRow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.headerTitleRow h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    color: #fff;
    text-align: center;
    flex: 1;
}

.moreBtn {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    padding: 8px;
    color: #fff;
    cursor: pointer;
}

/* 消息区域 */
.messagesContainer {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    background: #e6e6e6;
    background-image: url('');
    background-repeat: repeat;
    background-attachment: fixed;
}

/* 消息气泡样式 */
.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.messageRow {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin: 0 8px;
    background: #f0f0f0;
}

.bubbleWrap {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.ownMessage {
    align-items: flex-end;
}

.ownMessage .bubbleWrap {
    align-items: flex-end;
}

.bubbleBox {
    display: flex;
    align-items: flex-end;
}

.bubbleArrowLeft {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 8px solid #fff;
    margin-right: -1px;
}

.bubbleArrowRight {
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #95ec69;
    margin-left: -1px;
}

.messageContent {
    padding: 10px 14px;
    border-radius: 4px;
    position: relative;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.ownMessage .messageContent {
    background: #95ec69;
    color: #000;
    border-top-right-radius: 0;
}

.otherMessage .messageContent {
    background: #fff;
    color: #000;
    border-top-left-radius: 0;
}

.messageTime {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

.otherMessage .messageTime {
    text-align: left;
}

/* 输入栏样式 */
.inputBarWx {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    padding: 8px 10px;
    border-top: 1px solid #d9d9d9;
    position: relative;
    z-index: 10;
}

.wxIconBtn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #7d7d7d;
    cursor: pointer;
    outline: none;
}

.wxInput {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: #fff;
    margin: 0 8px;
    padding: 0 12px;
    font-size: 16px;
    outline: none;
    box-shadow: none;
}

.wxVoiceBtn {
    flex: 1;
    height: 36px;
    background: #f1f1f1;
    border: none;
    border-radius: 4px;
    color: #333;
    font-size: 16px;
    text-align: center;
    margin: 0 8px;
    outline: none;
    cursor: pointer;
}

/* 更多功能面板 */
.plusPanelMask {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.plusPanel {
    width: 100%;
    background: #f0f0f0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: panelUp 0.2s ease-out;
}

@keyframes panelUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.plusPanelRow {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
}

.plusPanelItem {
    width: 72px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.plusPanelIcon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.plusPanelText {
    font-size: 12px;
    color: #666;
}

.plusPanelDots {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.dot, .dotActive {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
    margin: 0 3px;
}

.dotActive {
    background: #888;
}

/* 调试信息区域 */
.debugInfo {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px 15px;
    font-size: 12px;
}

.debugInfo details {
    cursor: pointer;
}

.debugInfo summary {
    color: #666;
    font-weight: 500;
    padding: 5px 0;
}

.debugInfo div {
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #eee;
}

.debugInfo p {
    margin: 3px 0;
    font-family: monospace;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chatContainer {
        height: 100vh;
    }
    
    .messagesContainer {
        padding: 8px 12px;
    }
    
    .avatar {
        width: 36px;
        height: 36px;
    }
    
    .messageContent {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .inputBarWx {
        padding: 6px 8px;
    }
    
    .wxIconBtn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .wxInput {
        height: 32px;
        font-size: 15px;
    }
    
    .wxVoiceBtn {
        height: 32px;
        font-size: 15px;
    }
    
    .plusPanelItem {
        width: 64px;
        height: 80px;
    }
    
    .plusPanelIcon {
        width: 40px;
        height: 40px;
    }
}

.sendBtn {
    width: 56px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: #06c05f;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin-left: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 2px rgba(6,192,95,0.08);
}
.sendBtn:active {
    background: #04a24c;
}
.sendBtn:disabled {
    background: #b7ebc7;
    color: #fff;
    cursor: not-allowed;
}
.sendBtnText {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
}

.recordMask {
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.recordModal {
    background: rgba(40,40,40,0.98);
    border-radius: 16px;
    padding: 36px 38px 24px 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}
.recordMicWrap {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    width: auto;
    height: 64px;
    margin-bottom: 12px;
    position: relative;
}
.recordMic {
    z-index: 2;
    width: 32px;
    height: 32px;
    
    margin-bottom: 10px;
}
.recordRipple, .recordRipple2 {
    position: absolute;
    left: 0; top: 0;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(6,192,95,0.18);
    z-index: 1;
    animation: ripple 1.2s infinite linear;
}
.recordRipple2 {
    animation-delay: 0.6s;
}
@keyframes ripple {
    0% { transform: scale(0.8); opacity: 0.7; }
    70% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(1.4); opacity: 0; }
}
.recordText {
    color: #fff;
    font-size: 15px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.recordTime {
    color: #06c05f;
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 1px;
}
@media (max-width: 768px) {
    .recordModal {
        padding: 24px 10px 16px 10px;
        min-width: 120px;
    }
    .recordMicWrap {
        height: 48px;
    }
    .recordMic {
        width: 24px;
        height: 24px;
        margin-bottom: 6px;
    }
    .recordRipple, .recordRipple2 {
        width: 48px; height: 48px;
    }
    .recordText {
        font-size: 13px;
    }
    .recordTime {
        font-size: 12px;
    }
    .recordVolumeBar {
        width: 24px;
        height: 36px;
        margin-right: 6px;
    }
}

.voiceBubble {
    min-width: 90px;
    max-width: 220px;
    height: 40px;
    background: #95ec69;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 18px 0 18px;
    font-size: 18px;
    color: #111;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    user-select: none;
    transition: background 0.18s;
}
.ownMessage .voiceBubble {
    background: #95ec69;
    justify-content: flex-end;
}
.otherMessage .voiceBubble {
    background: #fff;
    justify-content: flex-start;
    color: #111;
}
.voiceDuration {
    margin-right: 10px;
    font-size: 18px;
    font-weight: 500;
}
.ownMessage .voiceDuration {
    margin-left: 10px;
    margin-right: 0;
}
.voiceIcon {
    display: flex;
    align-items: center;
    font-size: 20px;
}
.voiceUnreadDot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ff3b30;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.recordVolumeBar {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 52px;
    width: 36px;
    margin-right: 10px;
    margin-left: 0;
    position: relative;
}
.recordVolumeCol {
    width: 4px;
    margin: 0 1.5px;
    border-radius: 2px;
    background: #06c05f;
    transition: height 0.18s, opacity 0.18s;
}
.recordMic {
    z-index: 2;
    width: 32px;
    height: 32px;
}

.voicePlayingBar {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    vertical-align: middle;
    background: url('data:image/svg+xml;utf8,<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="6" width="2" height="6" rx="1" fill="%2306c05f"><animate attributeName="height" values="6;14;6" dur="0.7s" repeatCount="indefinite"/></rect><rect x="8" y="3" width="2" height="12" rx="1" fill="%2306c05f"><animate attributeName="height" values="12;6;12" dur="0.7s" repeatCount="indefinite"/></rect><rect x="14" y="7" width="2" height="4" rx="1" fill="%2306c05f"><animate attributeName="height" values="4;12;4" dur="0.7s" repeatCount="indefinite"/></rect></svg>') center/contain no-repeat;
}

.album-image {
  border: 2px solid #000;
}
.album-image img {
  border: 2px solid #000 !important;
}